package cn.com.frame.app.mapper;


import cn.com.frame.app.pojo.po.FtMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FtMenuMapper extends BaseMapper<FtMenu>{

   /**
    * 动态sql
    * @param menuName
    * @return
    */
   @Select("<script> select * from ft_menu where `status` = 1 "+
           " <if test=\"menuName!=null &amp; menuName!=\'\'  \"> and menu_name = #{menuName} </if> </script>")
   List<FtMenu> getList(@Param("menuName") String menuName);


  /*
    返回自增主键

   @Insert("INSERT INTO ft_role (role_name,back_login, status, is_delete, remark, gmt_create_id,gmt_create,gmt_modified_id,gmt_modified) "
           + "VALUES (#{roleName},#{backLogin} ,#{status}, #{isDelete}, #{remark}, #{gmtCreateId}, now(), #{gmtModifiedId},#{gmtModified})")
   @Options(useGeneratedKeys = true, keyProperty = "roleId", keyColumn = "role_id")
   int insert (FtRoleDO ftRoleDO);

   */

}
